using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using AntDesign;
using AntDesign.ProLayout;

namespace ZFY.UMC.BlazorWebAssembly.Components
{
    public partial class RightContent
    {


        [Inject] protected NavigationManager NavigationManager { get; set; }

        [Inject] protected MessageService MessageService { get; set; }

        protected override async Task OnInitializedAsync()
        {
            SetClassMap();
        }

        protected void SetClassMap()
        {
            ClassMapper
                .Clear()
                .Add("right");
        }

        public void HandleSelectUser(MenuItem item)
        {
            
            switch (item.Key)
            {
                case "logout":
                    NavigationManager.NavigateTo("/authentication/logout");
                    break;
            }
        }

        public void HandleSelectLang(MenuItem item)
        {
        }


        public async Task HandleViewMore(string key)
        {
            await MessageService.Info("Click on view more");
        }
    }
}